package com.dianping.cat.home.dal.report;

import java.util.Date;
import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class OverloadDao extends AbstractDao {
/* 11 */   public Overload createLocal() { return new Overload(); }





/* 17 */   public int deleteByPK(Overload proto) throws DalException { return getQueryEngine().deleteSingle(OverloadEntity.DELETE_BY_PK, proto); }



  
  public List<Overload> findIdAndSizeByDuration(Date startTime, Date endTime, Readset<Overload> readset) throws DalException {
/* 23 */     Overload proto = new Overload();

/* 25 */     proto.setStartTime(startTime);
/* 26 */     proto.setEndTime(endTime);

/* 28 */     return getQueryEngine().queryMultiple(OverloadEntity.FIND_ID_AND_SIZE_BY_DURATION, proto, readset);
  }





  
  public Overload findByPK(int keyId, Readset<Overload> readset) throws DalException {
/* 37 */     Overload proto = new Overload();

/* 39 */     proto.setKeyId(keyId);

/* 41 */     return (Overload)getQueryEngine().querySingle(OverloadEntity.FIND_BY_PK, proto, readset);
  }





  
  public Overload findMaxIdByType(int type, Readset<Overload> readset) throws DalException {
/* 50 */     Overload proto = new Overload();

/* 52 */     proto.setType(type);

/* 54 */     return (Overload)getQueryEngine().querySingle(OverloadEntity.FIND_MAX_ID_BY_TYPE, proto, readset);
  }





  
  public Overload findCount(Readset<Overload> readset) throws DalException {
/* 63 */     Overload proto = new Overload();

/* 65 */     return (Overload)getQueryEngine().querySingle(OverloadEntity.FIND_COUNT, proto, readset);
  }







  
/* 75 */   protected Class<?>[] getEntityClasses() { return new Class[] { OverloadEntity.class }; }



/* 79 */   public int insert(Overload proto) throws DalException { return getQueryEngine().insertSingle(OverloadEntity.INSERT, proto); }





/* 85 */   public int updateByPK(Overload proto, Updateset<Overload> updateset) throws DalException { return getQueryEngine().updateSingle(OverloadEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/dal/report/OverloadDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */